<template>
  <div>
    <div class="searchArea flex">
      <div class="flex searchBox">
        <el-input
          placeholder="请输入客户姓名"
          v-model="searchForm.customerName"
          clearable
          auto-complete="on"
          style="width:15%"
        ></el-input>
        <el-input
          placeholder="请输入制造商料号"
          v-model="searchForm.materialNo"
          clearable
          auto-complete="on"
          style="width:15%"
        ></el-input>
        <el-input
          placeholder="请输入申请人"
          v-model="searchForm.applicant"
          clearable
          auto-complete="on"
          style="width:12%"
        ></el-input>
        <el-date-picker
          v-model="searchForm.timeRange"
          clearable
          type="daterange"
          range-separator="至"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
        ></el-date-picker>
        <el-select v-model="searchForm.status" placeholder="状态" style="width:10%">
          <el-option label="未出货" value="0"></el-option>
          <el-option label="已出货" value="1"></el-option>
        </el-select>
      </div>
      <div>
        <el-button style="background: rgb(7, 131, 241);color: #fff;" @click="search">查询</el-button>
        <slot name="addOrder"></slot>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    searchForm: {
      type: Object,
      default: {}
    }
  },
  methods: {
    search() {
      this.$emit("search");
    }
  }
};
</script>

<style lang="scss" scoped>
.searchArea {
  width: 100%;
  padding: 10px 15px;
  margin: 15px 0;
  border-radius: 5px;
  background: #fff;
  box-shadow: 2px 3px 15px 0 #ccc;
  justify-content: space-between;
  .searchBox {
    width: 70%;
    justify-content: space-between;
  }
}
</style>